package com.learn.quartz.job;

import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * 定时任务
 *
 * @author: MI
 * @email: 448341911@qq.com
 * @createDate: 2023/10/29 11:14
 * @updateUser: MI
 * @updateDate: 2023/10/29 11:14
 * @updateRemark: 修改内容
 * @version: v1.0
 */
@Slf4j
public class MyJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        LocalDateTime now = LocalDateTime.now();
        log.info("定时任务开始" + now.format(DateTimeFormatter.ofPattern("HH:mm:ss")));
    }
}
